.position(@top: false; @right: false; @bottom: false; @left: false; @position: absolute){
  & when(isnumber(@top)){
    top:@top;
  }
  & when(isnumber(@bottom)){
    bottom:@bottom;
  }
  & when(isnumber(@left)){
    left:@left;
  }
  & when(isnumber(@right)){
    right:@right;
  }
  & when(iskeyword(@position)){
    position: @position;
  }
}

.center(@width, @height){
    position: absolute;
    & when(isnumber(@width)){
        width: @width;
        left: 50%;
        margin-left: -@width/2;
    }
    & when(isnumber(@height)){
        height: @height;
        top: 50%;
        margin-top: -@height/2;
    }
}